import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 分页获取该学校待确认设备列表
export function list (query) {
    return request({
        url: '/school/order/orderPage',
        method: 'get',
        params: query
    })
}

// 详情
export function getById (query) {
    return request({
        url: '/school/order/getById/' + query.id,
        method: 'get',
        params: query
    })
}

// 根据购物车id新增订单
export function add (id) {
    return request({
        url: '/school/order/addByShopCartId/' + id,
        method: 'get'
    })
}

// 修改
export function edit (data) {
    return request({
        url: '/school/order/edit',
        method: 'put',
        data: data
    })
}

// 删除
export function deleteById (data) {
    return request({
        url: '/school/order/deleteById/' + data.id,
        method: 'delete',
        data
    })
}

